<HTML><HEAD><TITLE>?Term1 == ?Term2</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Comparing and Sorting</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>?Term1 == ?Term2</H1>
Succeeds if Term1 and Term2 are identical terms.


<DL>
<DT><EM>Term1</EM></DT>
<DD>An arbitrary term.
</DD>
<DT><EM>Term2</EM></DT>
<DD>An arbitrary term.
</DD>
</DL>
<H2>Description</H2>
   Used to compare Term1 with Term2.  Succeeds if Term1 and Term2 are
   identical terms.  It does not attempt unification.  Two variables are
   considered as identical only if one is bound to the other, or if they
   are both bound to identical terms.  Ground terms are identical only if
   they unify.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>==(?, ?) is semidet
</UL>
<H3>Fail Conditions</H3>
Fails if Term1 and Term2 are not identical.
<H2>Examples</H2>
<PRE>
   Success:
   atom == atom.
   1 == 1.
   X == X.                      (gives X = _g70)
   X = 1, Y = 1, Y == X.        (gives X = 1, Y = 1)
   X = Y, X == Y, Y == X.       (gives Y = _g80, X = _g80)
   [ a,b| [ ] ] == [ a,b ].
   f(1,2) == f(1,2).
   Fail:
   atom == neutron.
   atom == X.
   1 == 1.0.
   X == Y.
   [a|b] == [a,b].
   [a|X] == [a,X].



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/termcomp/REE-2.html">\== / 2</A>, <A HREF="../../kernel/termcomp/E-2.html">= / 2</A>
</BODY></HTML>
